//
//  ZLExamBeginHeaderView.m
//  ZLExamination
//
//  Created by Zheng on 2017/8/18.
//  Copyright © 2017年 Zheng. All rights reserved.
//

#import "ZLExamBeginHeaderView.h"

@implementation ZLExamBeginHeaderView

- (instancetype)init {
    self = [super init];
    if (self) {
        [self addSubview:self.numberLbl];
        [self addSubview:self.titleLbl];
        [self addSubview:self.examNameLbl];
        
        [_numberLbl mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(12);
            make.centerY.equalTo(self);
        }];
        
        [_titleLbl mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(_numberLbl.mas_right).offset(15);
            make.width.mas_equalTo(67);
            make.height.mas_equalTo(17);
            make.centerY.equalTo(self);
        }];
        
        [_examNameLbl mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.mas_equalTo(-12);
            make.centerY.equalTo(self);
        }];
    }
    return self;
}

- (UILabel *)numberLbl {
    if (!_numberLbl) {
        _numberLbl = [[UILabel alloc] init];
        _numberLbl.font = kMyFont(14);
        _numberLbl.textColor = kMY_BLUE_COLOR;
    }
    return _numberLbl;
}

- (UILabel *)titleLbl {
    if (!_titleLbl) {
        _titleLbl = [[UILabel alloc] init];
        _titleLbl.font = kMyFont(11);
        _titleLbl.textColor = [UIColor whiteColor];
        _titleLbl.textAlignment = NSTextAlignmentCenter;
        _titleLbl.layer.cornerRadius = 6;
        _titleLbl.layer.backgroundColor = [kMY_BLUE_COLOR CGColor];
//        _titleLbl.text = @"单项选择题";
    }
    return _titleLbl;
}

- (UILabel *)examNameLbl {
    if (!_examNameLbl) {
        _examNameLbl = [[UILabel alloc] init];
        _examNameLbl.font = kMyFont(12);
        _examNameLbl.textColor = [UIColor grayColor];
//        _examNameLbl.text = @"2017年公务员考试卷(春季)";
    }
    return _examNameLbl;
}




@end
